﻿using Missbot.Common;
using Newtonsoft.Json;

namespace Missbot.Model.MsgCmds
{
    /// <summary>
    /// 发往远端的命令
    /// </summary>
    public abstract class IMsgCommand
    {
        /// <summary>
        /// api接口地址
        /// </summary>
        [JsonIgnore]
        protected abstract string API { get; }

        /// <summary>
        /// 授权码
        /// </summary>
        [JsonProperty("i")]
        public string I { get; set; } = Configger<AIConfigBase>.AIConfig.Instance.I;

        [JsonIgnore]
        public string Url => $"https://{Configger<AIConfigBase>.AIConfig.Instance.LocalHost}/api/{API}";
    }
}